<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>APR (Airport Rhapsody): logging.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">APR (Airport Rhapsody)
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Implementation based on monitors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('logging_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">logging.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Problem name: Airport rhapsody.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="prob_const_8h_source.html">probConst.h</a>&quot;</code><br/>
</div>
<p><a href="logging_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae0bf7329c9c50bf88429f8aff1d30cc6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#ae0bf7329c9c50bf88429f8aff1d30cc6">createLog</a> (char *nFic)</td></tr>
<tr class="memdesc:ae0bf7329c9c50bf88429f8aff1d30cc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">File initialization.  <a href="#ae0bf7329c9c50bf88429f8aff1d30cc6">More...</a><br/></td></tr>
<tr class="separator:ae0bf7329c9c50bf88429f8aff1d30cc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7c90216aa53d988ffb2dc40c2691ecd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#ac7c90216aa53d988ffb2dc40c2691ecd">saveState</a> (char *nFic, unsigned int k, <a class="el" href="struct_f_u_l_l___s_t_a_t.html">FULL_STAT</a> *p_fSt)</td></tr>
<tr class="memdesc:ac7c90216aa53d988ffb2dc40c2691ecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writing the present full state as a double line at the end of the file.  <a href="#ac7c90216aa53d988ffb2dc40c2691ecd">More...</a><br/></td></tr>
<tr class="separator:ac7c90216aa53d988ffb2dc40c2691ecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad596ddb6303e7e4803ba3fd2ced6c563"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="logging_8h.html#ad596ddb6303e7e4803ba3fd2ced6c563">finalReport</a> (char *nFic, <a class="el" href="struct_f_u_l_l___s_t_a_t.html">FULL_STAT</a> *p_fSt)</td></tr>
<tr class="memdesc:ad596ddb6303e7e4803ba3fd2ced6c563"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writing the final report.  <a href="#ad596ddb6303e7e4803ba3fd2ced6c563">More...</a><br/></td></tr>
<tr class="separator:ad596ddb6303e7e4803ba3fd2ced6c563"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Problem name: Airport rhapsody. </p>
<p>(interface file)</p>
<p>Concept: António Rui Borges</p>
<p>Logging the problem internal state into a file.</p>
<p>Defined operations: </p>
<ul>
<li>file initialization </li>
<li>writing the present state as a single line at the end of the file </li>
<li>writing final report.</li>
</ul>
<dl class="section author"><dt>Author</dt><dd>António Rui Borges - November 2013 </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ae0bf7329c9c50bf88429f8aff1d30cc6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void createLog </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>nFic</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>File initialization. </p>
<p>The function creates the logging file and writes its header. If <code>nFic</code> is a null pointer or a null string, the file is created under a predefined name <em>log</em>.</p>
<p>The header consists of </p>
<ul>
<li>a line title </li>
<li>a blank line </li>
<li>a quad line describing the meaning of the different fields of the state lines.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nFic</td><td>name of the logging file </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad596ddb6303e7e4803ba3fd2ced6c563"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void finalReport </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>nFic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_u_l_l___s_t_a_t.html">FULL_STAT</a> *&#160;</td>
          <td class="paramname"><em>p_fSt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writing the final report. </p>
<p>If <code>nFic</code> is a null pointer or a null string, the lines are appended to a file under the predefined name <em>log</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nFic</td><td>name of the logging file </td></tr>
    <tr><td class="paramname">p_fSt</td><td>pointer to the location where the full internal state is stored </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac7c90216aa53d988ffb2dc40c2691ecd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void saveState </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>nFic</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_u_l_l___s_t_a_t.html">FULL_STAT</a> *&#160;</td>
          <td class="paramname"><em>p_fSt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writing the present full state as a double line at the end of the file. </p>
<p>If <code>nFic</code> is a null pointer or a null string, the lines are appended to a file under the predefined name <em>log</em>.</p>
<p>The following layout is obeyed for the full state in a double line </p>
<ul>
<li>plane, porter, driver, queue and bus state </li>
<li>passengers state (p = 0,..., N-1).</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nFic</td><td>name of the logging file </td></tr>
    <tr><td class="paramname">k</td><td>flight number </td></tr>
    <tr><td class="paramname">p_fSt</td><td>pointer to the location where the full internal state is stored </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="logging_8h.html">logging.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
